home *** CD-ROM | disk | FTP | other *** search
- package views
- {
- import com.arpitonline.controls.ScrollImage;
- import flash.accessibility.*;
- import flash.debugger.*;
- import flash.display.*;
- import flash.errors.*;
- import flash.events.*;
- import flash.external.*;
- import flash.filters.*;
- import flash.geom.*;
- import flash.media.*;
- import flash.net.*;
- import flash.printing.*;
- import flash.profiler.*;
- import flash.system.*;
- import flash.text.*;
- import flash.ui.*;
- import flash.utils.*;
- import flash.xml.*;
- import mx.binding.*;
- import mx.containers.Canvas;
- import mx.core.UIComponentDescriptor;
- import mx.core.mx_internal;
- import mx.events.PropertyChangeEvent;
- import mx.styles.*;
-
- public class Read extends Canvas
- {
- private static var _watcherSetupUtil:IWatcherSetupUtil;
-
- private var _bindings:Array;
-
- [Bindable]
- private var _95458899debug:String;
-
- public var _bindingsByDestination:Object;
-
- private var lastX:int = 0;
-
- private var lastY:int = 0;
-
- [Bindable]
- private var _2044922510scrollImage:ScrollImage;
-
- public var _bindingsBeginWithWord:Object;
-
- private var mouseIsDown:Boolean = false;
-
- [Bindable]
- private var _859611628imageURL:String;
-
- private var scrollHeight:int;
-
- private var imgHeight:int;
-
- private var scrollWidth:int;
-
- private var _watchers:Array;
-
- private var imgWidth:int;
-
- private var _documentDescriptor_:UIComponentDescriptor;
-
- public function Read()
- {
- _documentDescriptor_ = new UIComponentDescriptor({
- "type":Canvas,
- "propertiesFactory":function():Object
- {
- return {"childDescriptors":[new UIComponentDescriptor({
- "type":ScrollImage,
- "id":"scrollImage",
- "stylesFactory":function():void
- {
- this.borderThickness = 0;
- },
- "propertiesFactory":function():Object
- {
- return {
- "percentHeight":100,
- "percentWidth":100
- };
- }
- })]};
- }
- });
- lastX = 0;
- lastY = 0;
- mouseIsDown = false;
- super();
- mx_internal::_document = this;
- this.percentWidth = 100;
- this.percentHeight = 100;
- this.horizontalScrollPolicy = "off";
- this.verticalScrollPolicy = "off";
- }
-
- public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
- {
- Read._watcherSetupUtil = param1;
- }
-
- public function set imageURL(param1:String) : void
- {
- var _loc2_:Object = null;
- _loc2_ = this._859611628imageURL;
- if(_loc2_ !== param1)
- {
- this._859611628imageURL = param1;
- dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"imageURL",_loc2_,param1));
- }
- }
-
- private function _Read_bindingsSetup() : void
- {
- var binding:Binding = null;
- if(!_bindings)
- {
- _bindings = [];
- }
- if(!_watchers)
- {
- _watchers = [];
- }
- binding = new Binding(this,function():String
- {
- var _loc1_:* = undefined;
- var _loc2_:* = undefined;
- _loc1_ = "images/large/" + imageURL;
- return _loc1_ == undefined ? null : String(_loc1_);
- },function(param1:String):void
- {
- scrollImage.source = param1;
- },"scrollImage.source");
- _bindings[0] = binding;
- }
-
- private function set debug(param1:String) : void
- {
- var _loc2_:Object = null;
- _loc2_ = this._95458899debug;
- if(_loc2_ !== param1)
- {
- this._95458899debug = param1;
- dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"debug",_loc2_,param1));
- }
- }
-
- override public function set visible(param1:Boolean) : void
- {
- super.visible = param1;
- if(Boolean(scrollImage) && param1)
- {
- scrollImage.zero();
- }
- }
-
- private function imageInit(param1:Event) : void
- {
- trace("imageInit for " + this);
- param1.target.x = 0;
- param1.target.y = 0;
- imgWidth = param1.target.contentWidth;
- imgHeight = param1.target.contentHeight;
- param1.target.width = imgWidth;
- param1.target.height = imgHeight;
- }
-
- public function set scrollImage(param1:ScrollImage) : void
- {
- var _loc2_:Object = null;
- _loc2_ = this._2044922510scrollImage;
- if(_loc2_ !== param1)
- {
- this._2044922510scrollImage = param1;
- dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"scrollImage",_loc2_,param1));
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get imageURL() : String
- {
- return this._859611628imageURL;
- }
-
- [Bindable(event="propertyChange")]
- private function get debug() : String
- {
- return this._95458899debug;
- }
-
- [Bindable(event="propertyChange")]
- public function get scrollImage() : ScrollImage
- {
- return this._2044922510scrollImage;
- }
-
- private function _Read_bindingExprs() : void
- {
- var _loc1_:* = undefined;
- _loc1_ = "images/large/" + imageURL;
- }
-
- override public function initialize() : void
- {
- var target:Read = null;
- var watcherSetupUtilClass:Object = null;
- mx_internal::setDocumentDescriptor(_documentDescriptor_);
- _Read_bindingsSetup();
- target = this;
- if(_watcherSetupUtil == null)
- {
- watcherSetupUtilClass = getDefinitionByName("_views_ReadWatcherSetupUtil");
- watcherSetupUtilClass["init"](null);
- }
- _watcherSetupUtil.setup(this,function(param1:String):*
- {
- return target[param1];
- },_bindings,_watchers);
- super.initialize();
- }
- }
- }
-
-